import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getSmsBasePath();


/**
 * sms_flow
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'短信流水ID 主键',smsTempateId:'短信模板ID',text:'发送的内容',createTime:'创建时间',sendUserId:'发送人ID',receiveUserId:'接收人ID',tel:'国际电话号码',sign:'短信签名内容',params:'模板参数',createDate:'创建时间',sendShopId:'发送者商户号码',sendLocationId:'发送者门店编号，如果是总部店则为0',sendStatus:'0待发送1发送成功2发送失败3发送中4结束',sendTime:'发送时间',extendNo:'扩展字段',batchNo:'批量处理号码',lockNo:'批量处理锁编号',lockStatus:'0未锁定1锁定',serviceChargesStatus:'0待扣费1已扣费2扣费失败',serviceChargesTime:'扣费时间'}
 **/
 
//普通查询 条件之间and关系  
export const listSmsFlow = params => { return axios.get(`${base}/sms/smsFlow/list`, { params: params }); };

//模糊查询sms_flow 条件之间or关系  
//export const listSmsFlowKey = params => { return axios.get(`${base}/sms/smsFlow/listKey`, { params: params }); };

//删除一条sms_flow params={id:'短信流水ID 主键'}
export const delSmsFlow = params => { return axios.post(`${base}/sms/smsFlow/del`,params); };

//批量删除sms_flow  params=[{id:'短信流水ID 主键'}]
export const batchDelSmsFlow = params => { return axios.post(`${base}/sms/smsFlow/batchDel`, params); };

//修改一条sms_flow记录
export const editSmsFlow = params => { return axios.post(`${base}/sms/smsFlow/edit`, params); };

//新增一条sms_flow
export const addSmsFlow = params => { return axios.post(`${base}/sms/smsFlow/add`, params); };